//
//  BackgroundedNavigationBar.m
//  TaduFramework
//
//  Created by Xu Deheng on 12-6-18.
//  Copyright (c) 2012年 . All rights reserved.
//

#import "XNavigationBar.h"
#import "FunctionSet.h"

#if TARGET_OS_IPHONE

@implementation XNavigationBar

@synthesize backgroundImage = _backgroundImage;

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

#if !ARC_ENABLED
- (void)dealloc
{
    [_backgroundImage release];
    [super dealloc];
}
#endif

- (void)awakeFromNib
{
    [super awakeFromNib];
    //configure the uniform background
    //self.backgroundColor = [UIColor scrollViewTexturedBackgroundColor];
}

// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
//    CGContextRef ctx = UIGraphicsGetCurrentContext();
//    if (_backgroundImage) {
//        CGContextSetFillColorWithColor(ctx, [UIColor colorWithPatternImage:_backgroundImage].CGColor);
//    }else {
//        CGContextSetFillColorWithColor(ctx, [UIColor scrollViewTexturedBackgroundColor].CGColor);
//    }
//    CGContextFillRect(ctx, rect);
//    if (_backgroundImage) {
//        [self.backgroundImage drawInRect:rect];
//    }
}


@end
#endif
